SCHEMA = 'zentity'
_PREFIX = 'zentity.'
COMPONENTS_TABLE_FULL_NAME = (_PREFIX + 'components')
GENERATORS_TABLE_FULL_NAME = (_PREFIX + 'generators')
INGREDIENT_INITS_TABLE_FULL_NAME = (_PREFIX + 'ingredientInitialValues')
INGREDIENTS_TABLE_FULL_NAME = (_PREFIX + 'ingredients')
SPAWN_OVERRIDES_TABLE_FULL_NAME = (_PREFIX + 'spawnOverrides')
SPAWNS_TABLE_FULL_NAME = (_PREFIX + 'spawns')
SELECT_ENTITY = 'zentity_SelectEntity'
ENTITY_STATE_UNINITIALIZED = 0
ENTITY_STATE_CREATING = 1
ENTITY_STATE_READY = 2
ENTITY_STATE_DESTROYING = 3
ENTITY_STATE_DEAD = 4
ENTITY_STATE_NAMES = {ENTITY_STATE_UNINITIALIZED: 'Uninitialized',
 ENTITY_STATE_CREATING: 'Creating',
 ENTITY_STATE_READY: 'Ready',
 ENTITY_STATE_DESTROYING: 'Destroying',
 ENTITY_STATE_DEAD: 'Dead'}
INVALID_COMPONENT_ID = None
PLAYER_COMPONENT_ID = 1
MOVEMENT_COMPONENT_ID = 2
POSITION_COMPONENT_ID = 3
BOUNDING_VOLUME_COMPONENT_ID = 4
PAPER_DOLL_COMPONENT_ID = 5
APERTURE_COMPONENT_ID = 6
PROXIMITY_TRIGGER_COMPONENT_ID = 7
ANIMATION_COMPONENT_ID = 8
ACTION_COMPONENT_ID = 9
PERCEPTION_COMPONENT_ID = 10
CONTEXT_MENU_COMPONENT_ID = 11
AUDIO_EMMITTER_COMPONENT_ID = 12
GRAPHICS_COMPONENT_ID = 13
COLLISION_MESH_COMPONENT_ID = 14
MINIGAME_AI_COMPONENT_ID = 15
MINIGAME_CONFIG_COMPONENT_ID = 16
MINIGAME_LOGIC_COMPONENT_ID = 17
AIMING_COMPONENT_ID = 18
APERTURE_SUBJECT_COMPONENT_ID = 19
SIMPLE_TEST_COMPONENT_ID = 20
ACTION_OBJECT_COMPONENT_ID = 21
SELECTION_COMPONENT_ID = 22
DECISION_TREE_COMPONENT_ID = 23
INFO_COMPONENT_ID = 24
ATTRIBUTE_COMPONENT_ID = 50
BUFF_COMPONENT_ID = 51
MODIFIER_COMPONENT_ID = 52
ROOM_EDIT_COMPONENT_ID = 53
ZACTION_COMPONENT_ID = 54
PROXIMITY_COMPONENT_ID = 55
COMPONENTDATA_INVALID_TYPE = 0
COMPONENTDATA_ID_TYPE = 1
COMPONENTDATA_STRING_TYPE = 2
COMPONENTDATA_INT_TYPE = 3
COMPONENTDATA_FLOAT_TYPE = 4
COMPONENTDATA_BOOL_TYPE = 5
COMPONENTDATA_NON_PRIMITIVE_TYPE = 6
COMPONENTDATA_LONG_TYPE = 7
_PROJECT_SPECIFIC_MIN_DATATYPEID = 1000000
COMPONENTDATA_INVALID_TYPE_NAME = 'Invalid Data Type'
COMPONENTDATA_ID_TYPE_NAME = 'Generic ID'
COMPONENTDATA_STRING_TYPE_NAME = 'String'
COMPONENTDATA_INT_TYPE_NAME = 'Integer'
COMPONENTDATA_FLOAT_TYPE_NAME = 'Float'
COMPONENTDATA_BOOL_TYPE_NAME = 'Bool'
COMPONENTDATA_NON_PRIMITIVE_TYPE_NAME = 'Non Primitive'
COMPONENTDATA_LONG_TYPE_NAME = 'Long'
COMPONENTDATA_TYPE_TO_TYPE_NAME_MAP = {COMPONENTDATA_INVALID_TYPE: COMPONENTDATA_INVALID_TYPE_NAME,
 COMPONENTDATA_ID_TYPE: COMPONENTDATA_ID_TYPE_NAME,
 COMPONENTDATA_STRING_TYPE: COMPONENTDATA_STRING_TYPE_NAME,
 COMPONENTDATA_INT_TYPE: COMPONENTDATA_INT_TYPE_NAME,
 COMPONENTDATA_FLOAT_TYPE: COMPONENTDATA_FLOAT_TYPE_NAME,
 COMPONENTDATA_BOOL_TYPE: COMPONENTDATA_BOOL_TYPE_NAME,
 COMPONENTDATA_NON_PRIMITIVE_TYPE: COMPONENTDATA_NON_PRIMITIVE_TYPE_NAME,
 COMPONENTDATA_LONG_TYPE: COMPONENTDATA_LONG_TYPE_NAME}
COMPONENTDATA_TYPE_TO_PYTHON_TYPE_MAP = {COMPONENTDATA_INVALID_TYPE: None,
 COMPONENTDATA_ID_TYPE: int,
 COMPONENTDATA_STRING_TYPE: str,
 COMPONENTDATA_INT_TYPE: int,
 COMPONENTDATA_FLOAT_TYPE: float,
 COMPONENTDATA_BOOL_TYPE: int,
 COMPONENTDATA_NON_PRIMITIVE_TYPE: None,
 COMPONENTDATA_LONG_TYPE_NAME: long}

def _AppendDataTypeConstant(projectSpecificDataTypeID, typeName, pythonDataType):
    if (projectSpecificDataTypeID < _PROJECT_SPECIFIC_MIN_DATATYPEID):
        raise RuntimeError(('zentity dataType constants must have ID greater than %s:  %s is too low' % (projectSpecificDataTypeID, _PROJECT_SPECIFIC_MIN_DATATYPEID)))
    COMPONENTDATA_TYPE_TO_TYPE_NAME_MAP[projectSpecificDataTypeID] = typeName
    COMPONENTDATA_TYPE_TO_PYTHON_TYPE_MAP[projectSpecificDataTypeID] = pythonDataType



